package shopping.domain;

public class CartItem {
    private Product product;
    private int count;

    public double getSubtotal(){
        //等于商品价格 * 数量
        return product.getShop_price()*count;
    }

    public Product getProduct() {
        return product;
    }

    public void setProduct(Product product) {
        this.product = product;
    }

    public int getCount() {
        return count;
    }

    public void setCount(int count) {
        this.count = count;
    }
}
